package com.project.gcsj5.common;


public class Result {
    private Integer code;
    private  String msg;
    private Object data;

    public Result(int i, String success, Object data) {
        this.code = i;
        this.msg = success;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static Result success(Object data){
        return new Result(1,"success",data);
    }

    public static Result fail(){
        return new Result(0,"操作执行失败，请检查后重试",null);
    }

}
